Mobile communications technologies are used to support user equipment (User Equipment, UE) in connecting to the Internet by using a mobile network. A cellular network is a typical mobile network, and includes GPRS (General Packet Radio System, general packet radio system), UMTS (Universal Mobile Telecommunications System, Universal Mobile Telecommunications System), and EPS (Evolved Packet System, evolved packet system), where GPRS, UMTS, and EPS are generally referred to as 2G, 3G, and 4G for short. A wireless local area network WLAN (Wireless Local Area Network) is also a typical mobile network, generally referred to as WiFi.
Before a UE can connect to a mobile network, a subscriber first needs to perform subscription with an operator who is responsible for operating the mobile network, acquire an authorized SIM (Subscriber Identity Module, subscriber identity module) card, and place the SIM card into the user equipment. A SIM card is a typical UICC (Universal Integrated Circuit Card, universal integrated circuit card). The SIM card provided by the forgoing operator includes information about the mobile network operated by the operator, for example, a PLMN ID (Public Land Mobile Network Identifier, public land mobile network identifier) and an encryption algorithm of the mobile network. When the UE is powered on and performs a network registration (for example, Attach, attach) procedure, a mobile network device (for example, an HSS, Home Subscriber Server, home subscriber server) determines, according to subscription information provided by the SIM card, that the registration is valid, and therefore accepts a registration request.
As the mobile network is more widely applied to the field of machine-to-machine communication, such as automatic meter reading, field data collection, and logistics tracking, user equipment for the foregoing machine-to-machine communication includes an authorized SIM card, and therefore can connect to the mobile network by using wireless technologies, and interact with a service server. Due to particularity of the machine-to-machine communication, after a terminal in which a SIM card is placed is properly installed, it is relatively difficult to replace the SIM card subsequently. For example, the terminal is located in a remote area or embedded inside an instrument. In addition, a relatively large quantity of devices for the machine-to-machine communication is generally distributed. Even though replacement can be performed, replacement workload is relatively heavy, and costs are relatively high. Therefore, when user equipment in which a SIM card is installed and that is used for the machine-to-machine communication is activated, if a service provider needs to switch a mobile network, high costs need to be spent in replacing the SIM card in the user equipment. In some cases, replacement even cannot be implemented, which brings many difficulties to service provisioning in the machine-to-machine communication.
To resolve the foregoing problem, standardization organizations, such as GSMA (Global System for Mobile Communications Association, Global System for Mobile Communications Association) and ETSI (European Telecommunications Standards Institute, European Telecommunications Standards Institute) propose defining a technology of a new type of UICC, so that an operator or a service provider can dynamically switch a home mobile network (that is, a mobile network with which the UICC performs subscription) of the UICC, that is, switch a home mobile network of user equipment in which the UICC is installed. The technology of the new type of UICC is referred to as an embedded UICC (Embedded UICC, eUICC), which is used to upgrade an UICC card and enable dynamic update of mobile network information (such as a PLMN ID and a security algorithm) in the UICC. In addition, a subscription manager (Subscription Manager, SM) is deployed on a network side, so as to control and manage the mobile network information in the embedded UICC, as shown in FIG. 1.
In an architecture in FIG. 1, an MN is a Mobile Network, that is, mobile network. An SM may communicate with multiple mobile networks MNs of one operator, or may communicate with multiple mobile networks MNs of different operators. The multiple mobile networks may be mobile networks of a same type, for example, all are cellular networks; or may be mobile networks of different types, for example, a combination of cellular networks and wireless local area networks. User equipment in which an eUICC is placed may connect to any one of the mobile networks (such as an MN1 in FIG. 1), and connect to the SM. When the SM instructs the user equipment to switch a mobile network, the user equipment may connect to a specified mobile network, such as an MN2 in FIG. 1.
To meet a requirement that the SM dynamically controls the UE in which the eUICC is installed to perform mobile network switching processing, the UE needs to first attach to a mobile network, such as the MN1 in FIG. 1, of an operator with which the UE originally performs subscription, and establish a data channel so as to access the SM. When receiving a request message of the UE, the SM sends new mobile network information to the UE by using the MN1. After updating mobile network information, the UE initiates attachment to the MN2, and implements the mobile network switching processing. In an EPS network, a specific process is shown in FIG. 2.
Step 1: A UE sends an attach request (Attach Request) message to an MME (Mobility Management Entity, mobility management entity), and initiates a procedure of attach to an MN1.
Step 2: The MME and a home location register/home subscriber register (Home Location Register/Home Subscriber Server, HLR/HSS) execute an authentication procedure and a location update procedure of the UE.
Step 3: The MME sends a create session request (Create Session Request) message to an SGW/a PGW (serving gateway/packet data network gateway), and establishes a default bearer (default bearer).
Step 4: The PGW/SGW sends a create session response (Create Session Response) message to the MME.
Step 5: The MME sends an attach accept (Attach Accept) message to the UE, and implements the procedures of attachment and default bearer establishment.
Step 6: The UE interacts with an SM to acquire new mobile network information.
Step 7: The UE initiates, according to the acquired new mobile network information, processing of attachment to a new mobile network, and registers with the new mobile network, so as to implement mobile network switching.
The foregoing process of mobile network switching is applicable to mobile network switching processing in a case in which the UE can normally attach to a network. However, due to the particularity of the machine-to-machine communication, the UE may fail to interact with the SM within a mobile network switching period, and therefore cannot normally implement mobile network switching. For example, to save power, the UE is automatically powered off when there is no service; or for a vehicle-mounted device, a subscriber turns off or stops using the device. This case is relatively common in a machine-to-machine communication scenario. In addition, because an operator and a service provider (Service Provider) cooperate according to a commercial contract, when the service provider switches a mobile network of the operator, the original operator is responsible for continuing to provide services for user equipment of the service provider within a switching period, so as to implement mobile network switching. However, the switching period generally has a limit, and after the period expires, the original operator is no longer responsible for continuing to provide a network connection service for the UE of the service provider. In this case, after the mobile network switching period expires, because the UE that previously cannot successfully implement a mobile network switching operation has only original mobile network information, the UE cannot connect to the original mobile network or interact with the SM. As a result, the UE loses contact with the service provider, and a service loss is caused.